home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / earthmap / _earthmap / maps / getpar / getpar_str < prev    next >
Encoding:
Text File  |  1989-04-01  |  968 b   |  40 lines

  1. /*
  2.  *
  3.  *  source file:   ./filters/loclib/getpar_string_store.c
  4.  *
  5.  * Joe Dellinger (SEP), June 11 1987
  6.  *    Inserted this sample edit history entry.
  7.  *    Please log any further modifications made to this file:
  8.  */
  9.  
  10. /* Rewrite 3-8-86 stew  Don't invoke parser unless we see par=.  This
  11.  *            leaves the shell's parsed output of the command
  12.  *            line intact, fixing joe's complaint.  Also a
  13.  *            bit faster.
  14.  *       2-15-88 joe  Should be hash_item "**q", not "*q". Oops.
  15.  */
  16. #include "fastpar.h"
  17. #include <stdio.h>
  18. #include <strings.h>
  19. getpar_string_store(q,qsize,string)
  20. hash_item **q;
  21. int qsize;
  22. register char *string;
  23. {
  24.  register int tlen, vlen;
  25.  register char *val;
  26.  
  27.  val = index(string,'=');
  28.  if(val == ((char *) NULL)) return;
  29.  tlen = val - string;
  30.  if(tlen <= 0) return;
  31.  val++;
  32.  vlen=strlen(val);
  33.  if(vlen <= 0) return;
  34.  getpar_hash_store(q,qsize,string,val,tlen,vlen);
  35.  if( tlen==3 && 0==bcmp(string,"par",3) ) {
  36.      getpar_stack_par(val);
  37.     getpar_scan(q,qsize);
  38.     }
  39. }
  40.